//***********************************************************************
//*                                                                     *
//*   Copyright (c) 1985-2019, American Megatrends International LLC.   *
//*                                                                     *
//*      All rights reserved. Subject to AMI licensing agreement.       *
//*                                                                     *
//***********************************************************************

#include <AmiDxeLib.h>
#include <Guids/OemHob.h>
#include <OemDxeLib/OemDxeLib.h>

EFI_STATUS FindHobEntryPoint(
	IN EFI_HANDLE           ImageHandle,
	IN EFI_SYSTEM_TABLE     *SystemTable
)
{
    EFI_STATUS              Status;
    EFI_GUID                gEfiHobListGuid     = HOB_LIST_GUID;
    Oem_Hob                 *OemHob             = NULL;
    UINT8					TestValue = 0;

	InitAmiLib(ImageHandle,SystemTable);

	OemHob = GetEfiConfigurationTable(SystemTable, &gEfiHobListGuid);
	if(OemHob != NULL)
	{
		Status = FindNextHobByGuid(
									&gOemHobGuid,
									(VOID**)&OemHob
									);

		if(!EFI_ERROR(Status))
		{
			TestValue = OemHob->OemTestData;
			//verify hob
			CmosDxeWrite(0xE0, TestValue);
		}
	}

	return EFI_SUCCESS;
}
